<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>参与的询价</title>
	<link href="/res/css/respective/priceAsk/buyer.css" rel="stylesheet">
		<style>
.mainContentWhite .dateInput {
	width: 90px;
	padding-left: 5px;
	background: url(/res/images/backicon.png) no-repeat 90px -200px;
}

.warp.warp-supplier .back-main .buyerTab .tabButt {
	padding: 15px 5px;
}
</style>
</head>
<body>
	[#assign menucode="myEnquiry"/]
	<div class="warp">
		[#include "/front/common/front_headAzt.html"]
		<div class="backcontent">
			[#include "/front/common/front_leftAzt.html"]
			<div class="back-main">
				<div class="mainContent">
					<div class="mainContentWhite">
						<h1>我参与的报价</h1>
						<hr>
							<table class="table noBorder">
								<form method="post" action="/enquiry/quote_${qtype!1}/list">
									<caption class="buyerTab">
										<div style="border: 1px solid #ebebeb; height: 46px;">
											<button
												class="tabButt [#if qtype?? && qtype == 2]tabButtActiveG[/#if]"
												onclick="location.href = '/enquiry/quote_2/list'"
												type="button">采购询价</button>
											<button
												class="tabButt [#if qtype?? && qtype == 1]tabButtActiveG[/#if]"
												style="border-right: 1px solid #e9e9e9;"
												onclick="location.href = '/enquiry/quote_1/list'"
												type="button">预算询价</button>
										</div>
										<div style="overflow: hidden;width: 100%;">
										<div class="supplySearch"
											style="float: left; margin-left: 5px;">
											<label>询价名称：</label> <input class="time"
												style="width: 110px;" type="text"
												value="${psd.enquiryName!}" name="enquiryName"
												placeholder="请输入询价名称"> <label>状态：</label>
												<div class="ppSelect"
													style="vertical-align: middle; line-height: 30px;">
													<select name="state"
														style="width: 100%; padding-right: 0px;">
														<option value="">所有状态</option> [#list allQuoteStat?keys as
														key ]
														<option value="${key}" [#if
															psd.state?? && psd.state?string==
															key ] selected="selected"[/#if]    >${allQuoteStat[key]}</option>
														[/#list]
													</select>
												</div> <label>反馈：</label>
												<div class="ppSelect"
													style="vertical-align: middle; line-height: 30px;">
													<select
														style="height: 100%; border: none; width: 100%; padding-right: 0px;"
														name="backInfo">
														<option value="">所有反馈</option>
														<option value="0" [#if
															psd.backInfo?? && psd.backInfo==0]selected[/#if]>采购员未查看</option>
														<option value="1" [#if
															psd.backInfo?? && psd.backInfo==1]selected[/#if]>采购员已查看</option>
														<option value="2" [#if
															psd.backInfo?? && psd.backInfo==2]selected[/#if]>纳入预算</option>
														<option value="3" [#if
															psd.backInfo?? && psd.backInfo==3]selected[/#if]>交易完成</option>
													</select>
												</div> <label>发布日期：</label> <input type="text"
												class="dateInput laydate-icon time" autocomplete="off"
												onclick="SelectDate(this,'yyyy-MM-dd hh:mm');"
												name="publishTimeStart" value="${psd.publishTimeStart!}"
												id="start"> <label>至</label> <input type="text"
													class="dateInput laydate-icon time" autocomplete="off"
													onclick="SelectDate(this,'yyyy-MM-dd hh:mm');"
													name="publishTimeEnd" value="${psd.publishTimeEnd!}"
													id="end" /> <input type="hidden" name="pageNo" id="pageNo"
													value="${psd.pageNo!}">
										</div>
										<div class="supplySearch">
											<button onclick="projectsosuo()" class="souSuo souSuoG"
												style="margin-top: 10px; min-width: auto;">搜索</button>
										</div>
										</div> 
									</caption>
								</form>
								<thead>
									<tr>
										<th style="width: 15%;">询价名称</th>
										<th style="width: 25%;">采购商</th>
										<th>状态</th>
										<!--[#if qtype?? && qtype == 1]-->
										<!--<th>设备清单</th>-->
										<!--[/#if]-->
										<!--[#if qtype?? && qtype == 2]-->
										<!--<th>公开类型</th>-->
										<!--[/#if]-->
										<th>参与时间</th>
										<th>我的报价</th>
										<th>反馈</th>
										<th style="width: 12%; border-right: 1px solid #e9e9e9;">操作</th>
									</tr>
								</thead>
								[#list desginList.list as enq]
								<tr>
									<td class="textoverflow"><a target="_blank"
										href="/xmh/${enq.enqId!}">${enq.enquiryName!}</a></td>
									<td class="[#if enq.sign ?? && enq.sign > 0]supTip[/#if]">
										<!-- [#if enq.sign ?? && enq.sign > 0]<a class="bugetTypeIconG">金</a>[/#if] -->
										<dfn> [#assign realCompanyName = ''] [#if
											enq.ppCompany??] [#assign realCompanyName = enq.ppCompany!]
											[#elseif enq.parentCompany??] [#assign realCompanyName =
											enq.parentCompany!] [#else] [#assign realCompanyName =
											enq.companyName!] [/#if]
											${myStringUtils.hideCompanyName(realCompanyName)} </dfn>
									</td>
									<td>[#if enq.quoteState??] <!--[#if enq.quoteState == 0]-->
										<!--[#if enq.suggest?? && enq.suggest != '']--> <!--<dfn style="color: red;">审核未通过</dfn>-->
										<!--[#else]--> <!--待审核--> <!--[/#if]--> <!--[/#if]--> <!--[#if enq.quoteState == 1]-->
										<!--[#if enq.orderQuoteId??]--> <!--[#if enq.orderState != 0]-->
										<!--[#if enq.orderState == 4]已完成[#else]已下单[/#if]--> <!--[#elseif enq.orderNums > 0]-->
										<!--未采纳--> <!--[/#if]--> <!--[#else]--> <!--<img style="vertical-align: middle;margin-right: 3px;" alt="" src="/res/images/priceAsk/clock1.png">比价中-->
										<!--[/#if]--> <!--[/#if]--> <!--[#if enq.quoteState == 2]已取消[/#if]-->
										[#if enq.quoteState == 1]<img
										style="vertical-align: middle; margin-right: 3px;" alt=""
										src="/res/images/priceAsk/clock1.png">[/#if]
											${allQuoteStat[enq.quoteState?string]!} [/#if] <!--<img style="vertical-align: middle;margin-right: 3px;" alt="" src="/res/images/priceAsk/clock1.png">-->
											<!--<dfn style="vertical-align: middle;">--> <!--${(enq.state == 1)?string('进行中' , '已截止')}-->
											<!--</dfn>--></td>
									<td>[#if
										enq.quoteDate??]${enq.quoteDate?string('yyyy-MM-dd')}[/#if]</td>
									<td>￥${enq.totalPrice!0}</td>
									<td>[#if enq.orderQuoteId?? && enq.orderState?? &&
										enq.orderState == 4] 交易完成 [#elseif enq.budget > 0] 纳入预算
										[#elseif enq.consulttime??] 已查看 <!--(${enq.consulttime?string('yyyy-MM-dd HH:mm:ss')})-->
										[#else] 未查看 [/#if]
									</td>

									<td>[#if enq.budget == 0 && (!enq.orderQuoteId??)] <a
										class="opLink" href="/enquiry/quoteEdit?quoteId=${enq.id!}"
										target="_blank">修改</a> [#if enq.quoteState == 1] <a
										class="opLink" href="javascript:void(0);"
										onclick="cancelQuote(${enq.id!});return false;">取消</a> [/#if]
										[/#if] <a class="opLink"
										href="/enquiry/quoteShow?quoteId=${enq.id!}" target="_blank">详情</a>
									</td>
								</tr>
								[/#list]
								</tbody>
								<tfoot class="goFenYe">[@fenye p = desginList form =
									'infoForm' /]
								</tfoot>
							</table>
					</div>
				</div>
			</div>
			<!-- 底部菜单-->
			[#include "/front/common/front_footerAzt.html"]
		</div>

	</div>

	<script src="/res/js/common/jquery.1.9.1.min.js"></script>
	<script src="/res/js/common/common.js"></script>
	<script src="/res/third/laydate/laydate.js"></script>
	<script src="/res/third/layer/layer.js"></script>
	<script type="text/javascript">
	var start = {
		elem: '#start',
		format: 'YYYY-MM-DD',
		min: '2015-06-16',  //设定最小日期为当前日期
		max: '2099-06-16', //最大日期
		istime: false,
		istoday: false,
		choose: function(datas){
			end.min = datas; //开始日选好后，重置结束日的最小日期
			end.start = datas //将结束日的初始值设定为开始日
		}
	};

	var end = {
		elem: '#end',
		format: 'YYYY-MM-DD',
		min: '2015-06-16',
		max: '2099-06-16',
		istime: false,
		istoday: false,
		choose: function(datas){
			start.max = datas; //结束日选好后，重置开始日的最大日期
		}
	};
	laydate(start);
	laydate(end);

	function cancelQuote(quoteId) {
		layer.confirm("是否确认取消此次报价？" , {icon:3} , function (index) {
			$.ajax({
				url : '/enquiry/quoteCancle' ,
				type : 'post' ,
				data : {quoteId : quoteId } ,
				dataType : 'json' ,
				beforeSend : function() {
					layer.load(2);
				},
				success : function(data) {
					layer.closeAll();
					if(data.success) {
						layer.alert("取消成功" , {icon :1});
						location.reload();
					}else{
						layer.alert(data.msg , {icon:2});
					}
				}

			})
		});
	}
</script>
</body>
</html>
